<!--

    Copyright (C) 2015 The Gravitee team (http://gravitee.io)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<section>
  <div class="gravitee-api-banner" ng-class="{'gravitee-api-banner-min': reducedMode}" ng-if="apiCtrl.canReview()" ng-cloak="">
    <div class="gravitee-api-banner-content" style="background-color: #d73a49">
      API in review<span permission permission-only="'api-reviews-u'"
        >, <a href="" ng-click="apiCtrl.showReviewConfirm($event, apiCtrl.api)">accept/reject changes</a></span
      >
    </div>
  </div>
  <div class="gravitee-api-banner" ng-class="{'gravitee-api-banner-min': reducedMode}" ng-if="apiCtrl.isRequestForChanges()" ng-cloak="">
    <div class="gravitee-api-banner-content" style="background-color: #d73a49">API reviewer requested changes</div>
  </div>
  <div class="gravitee-api-banner" ng-class="{'gravitee-api-banner-min': reducedMode}" ng-if="apiCtrl.isInDraft()" ng-cloak="">
    <div class="gravitee-api-banner-content" style="background-color: #54a3ff">API in draft</div>
  </div>
  <div class="gravitee-api-banner" ng-class="{'gravitee-api-banner-min': reducedMode}" ng-if="apiCtrl.isReviewOK()" ng-cloak="">
    <div class="gravitee-api-banner-content" style="background-color: #429f46">
      API review accepted<span permission permission-only="'api-reviews-u'"
        >,
        <a href="" ng-click="apiCtrl.showRequestForChangesConfirm($event, apiCtrl.api)">request for changes</a>
      </span>
    </div>
  </div>
  <div
    class="gravitee-api-banner"
    ng-class="{'gravitee-api-banner-min': reducedMode}"
    ng-hide="apiCtrl.apiIsSynchronized || apiCtrl.apiJustDeployed"
    ng-cloak=""
    ng-if="apiCtrl.canDeploy()"
  >
    <div class="gravitee-api-banner-content">
      API out of sync<span permission permission-only="'api-definition-u'"
        >, <a href="" ng-click="apiCtrl.showDeployAPIConfirm($event, apiCtrl.api)">deploy your API</a></span
      >
    </div>
  </div>
  <div class="gravitee-api-banner" ng-class="{'gravitee-api-banner-min': reducedMode}" ng-if="apiCtrl.isDeprecated()" ng-cloak="">
    <div class="gravitee-api-banner-content" style="background-color: #d73a49">API deprecated</div>
  </div>
  <div ui-view flex></div>
</section>
